package cn.edu.web.controller;

import cn.edu.model.User;
import cn.edu.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class UserController {
    @Autowired
    private IUserService userService;

    @RequestMapping("/find")
    public String find(Model model) {
        User user = userService.find();
        model.addAttribute("user", user);
        return "info";
    }
}
